<template>
  <Model
    :width="350"
    :show="show"
    title="审核"
    @confirm="confirm"
    @cancel="no"
    cancel-text="不通过"
    ok-text="通过"
    :footer="true"
    @noPass="cancel"
  >
    <a-card slot="card" :title="list.name + '的竞赛情况'" style="width: 300px">
      <!--    <a slot="extra" href="#">more</a>-->
      <p>竞赛id:{{ list.id }}</p>
      <p>年度:{{ list.year }}</p>
      <p>参赛名称:{{ list.name }}</p>
      <p>项目名称:{{ list.matchname }}</p>
      <p>负责人:{{ list.leader }}</p>
      <p>项目成员:{{ list.members }}</p>
      <p>指导老师:{{ list.teacher }}</p>
      <p>状态:{{ list.status }}</p>
      <p>所附文件( 点击即可下载文件 ):<a :href="IP + list.file">文件</a></p>
    </a-card>
  </Model>
</template>

<script>
import Model from "@/components/common/model/Model";
import { IP } from "network/request";
export default {
  components: { Model },
  props: {
    list: {
      type: Object,
      default: () => {
        return {};
      },
    },
    show: {
      type: Boolean,
      default() {
        return false;
      },
    },
  },
  name: "Card",
  data() {
    return { IP };
  },
  methods: {
    confirm() {
      console.log(this.list.id);
      this.$emit("confirm", {
        check: 1,
        id: this.list.id,
      });
    },
    no() {
      this.$emit("no");
    },
    cancel() {
      console.log(11);
      this.$emit("cancel", {
        check: 2,
        id: this.list.id,
      });
    },
  },
};
</script>

<style scoped>
</style>